#ifndef _SOCK_MSG_CTL_H
#define _SOCK_MSG_CTL_H
#include "msg_def.h"

typedef struct _act_msg_node
{
    sockActMsg msgHead;
    void * paramData;
    struct _act_msg_node * next;
}act_msg_node;

typedef struct _msg_buff_list
{
    act_msg_node * head;
    act_msg_node * tail;
}msg_buff_list;

extern int serverFd;
extern int peerFd;

int initSockServer(int needCreateThread);

void * sockRecvFunc(void * paramIn);
int decodeMsgHead(char * buffIn, void * msgHeadOut);

int parseMsg(char * msgBuff, int msgLen,void * msgHeadOut);
void init_msg_buff_list(void);
void * msgProcFunc(void * paramIn);

void* actMsgProc(void * msgIn);

typedef void (*moduleActFunc)(void * paramIn,void * actResultOut);

#endif